package com.galaxy.device.domain.bo;

import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.DeviceMachineType;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 机器类型业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceMachineType.class, reverseConvertGenerate = false)
public class DeviceMachineTypeBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 类型编码
     */
    @NotBlank(message = "类型编码不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 20, message = "类型编码长度不能超过20个字符")
    private String typeCode;

    /**
     * 类型名称
     */
    @NotBlank(message = "类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 50, message = "类型名称长度不能超过50个字符")
    private String typeName;

    /**
     * 类型描述
     */
    @Size(min = 0, max = 200, message = "类型描述长度不能超过200个字符")
    private String description;

    /**
     * 状态(0:禁用,1:正常)
     */
    private Integer status;
}
